<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible">
<title>重置密码--<!--{$mallname}--></title>
<!--{include(file='static.html')}-->
</head>
<body>
<!--{include(file='head.html')}-->
	<div class="container" style="padding:50px 0 30px;">
	<div class="reg_box">
    	<h1><span>重置密码</span></h1>
		<!--{if $hint}-->
			<p class="userhint<!--{$hint.type}-->">
				<!--{$hint.hint}-->
			</p>
		<!--{/if}-->
        <!--注册-->
    	<div class="login_twobox">
			<form name="theform" id="theform" action="<!--{url('index','user','setpwd')}-->" method="post" onsubmit="return check()">
        	<ul>
				<li>
					<div class="login_left"><span class="text_red">*</span>新密码：</div>
					<input name="pass" id="pass" type="password" class="login_butt"	/> 
					<span class="text_red"></span>
				</li>
				<li>
					<div class="login_left"><span class="text_red">*</span>确认新密码：</div>
					<input name="pass2" id="pass2" type="password" class="login_butt"	/> 
					<span class="text_red"></span>
				</li>
				<li style="margin-top:20px;">
					<div class="login_but">
						<input type="hidden" value="<!--{$uid}-->" name="uid"/>
						<input type="hidden" value="<!--{$mailkey}-->" name="mailkey"/>
						<input type="submit" class="o_button" value="重置密码"/>
					</div>
				</li>
			</ul>
			</form>
          
        </div>
        <!--注册 end-->
    </div>
</div>
<!--{include(file='foot.html')}-->
</body>
</html>
<script type="text/javascript">
function check() {
	var $pass		= $("#pass"),
		$pass2		= $("#pass2"),
		pass		= $pass.val(),
		pass2		= $pass2.val(),
		canpost		= true;
	if(pass == "") {
		$pass.next().text("请填写");
		canpost = false;
		$pass.addClass('hintborder');
	}
	if(pass2 == "") {
		$pass2.next().text("请填写");
		canpost = false;
		$pass2.addClass('hintborder');
	}
	return canpost;
}
$(function() {
	$("#pass,#pass2").focus(function(){
		$(this).removeClass("hintborder").next().text('');
	}).blur(function(){
		var $this	= $(this),
			val		= $this.val(),
			len		= val.length,
			$hint	= $this.next();
		if(val == "") return false;
		if(len < 4) {
			$hint.text("密码较短");
			return false;
		}
		if(len > 20) {
			$hint.text("密码较长");
			return false;
		}
		$hint.text('');
	});
});
</script>

